package SpLib.std
{
	import SpLib.std.list;
	
	public class queue
	{
		private var m_List:SpLib.std.list = new SpLib.std.list;
		
		public function queue()
		{
		}
		
		public function size():int
		{
			return m_List.size();
		}
		
		public function empty():Boolean
		{
			return m_List.empty();
		}
		
		public function clear():void
		{
			m_List.clear();
		}
		
		public function push(data:*):void
		{
			m_List.push_back(data);
		}
		
		public function pop():*
		{
			if(m_List.empty())
			{
				return null;
			}
			
			var data:* = m_List.front();
			m_List.pop_front();
			return data;
		}

	}
}